﻿using System;
using jQueryNET;

public partial class ContextMenu : System.Web.UI.Page
{
	protected void Page_Load(object sender, EventArgs e)
	{
		ContextMenu1.Items.Add(new MenuItem("Copy", null) { Enabled = false });
		ContextMenu1.Items.Add(new MenuItem("Past", null, "./Images/list-items.gif") { Action = "test()"});
		ContextMenu1.Items.Add(new MenuItem("Delete", null));
		ContextMenu1.Items.Add(new MenuItem("Documents", null) { Enabled = false });
        ContextMenu1.Items.Add(new MenuItem("-", null));

		var menuItem = new MenuItem("SubMenu1", null);
		menuItem.ChildItems.Add(new MenuItem("SubMenu1 Item 1", null));
		menuItem.ChildItems.Add(new MenuItem("SubMenu1 Item 2", null));
		menuItem.ChildItems.Add(new MenuItem("SubMenu1 Item 3", null));

		var menuItem1 = new MenuItem("SubMenu2", null);
		menuItem1.ChildItems.Add(new MenuItem("SubMenu2 Item 1", null));
		menuItem1.ChildItems.Add(new MenuItem("SubMenu2 Item 1", null));
		menuItem1.ChildItems.Add(new MenuItem("SubMenu2 Item 1", null));
		menuItem1.ChildItems.Add(menuItem);

        ContextMenu1.Items.Add(menuItem);

		ContextMenu1.Items.Add(menuItem1);
	}
}
